<template>
  <div class="lsd">
    <el-dialog
      title="联审单"
      top="22vh"
      :visible.sync="visible"
      @close="$emit('update:show', false)"
      :show="show"
      class="lsdhead"
    >
      <div>
        <div class="main">
          <!-- <div class="header">
            <h3>事项签审表</h3>
          </div> -->
          <div class="body">
            <table  cellspacing="0" cellpadding="0">
              <tr>
                <td width="157px" align="right">处(科)室意见&nbsp;&nbsp;</td>
                <td width="700px">
                    <ul>
                        <!-- <li >
                            <div class="left"> {{item.lzyj}}</div>
                            <div class="right">
                               <div>{{item.fsry}}</div>
                               <div>{{item.fsrq}}</div>
                            </div>
                        </li> -->
                        <li  v-for=" item in lsddepartmentList" :key="item.id">
                            <div class="item">
                                 <div class="left">&nbsp;&nbsp;{{item.lzyj}}</div>
                                 <div class="right">
                                     <div class="spr">{{item.fsry}}</div>
                                     <div class="sptime">{{item.fsrq}}</div>
                                 </div>
                                 
                            </div>
                           
                        </li>
                      
                    </ul>
                </td>
              </tr>
              <tr>
                <td width="157px" align="right">会办处(科)室意见&nbsp;&nbsp;</td>
                <td width="700px">&nbsp;&nbsp;</td>
              </tr>
              <tr>
                <td width="157px" align="right">会办室(科)室意见&nbsp;&nbsp;</td>
                <td width="700px">&nbsp;&nbsp;</td>
              </tr>
              <tr>
                <td width="157px" align="right">领导签发&nbsp;&nbsp;</td>
                <td width="700px">&nbsp;&nbsp;
                   <ul>
                        <li  v-for=" item in lsdleaderList" :key="item.id">
                            <div class="item">
                                 <div class="left">&nbsp;&nbsp;{{item.lzyj}}</div>
                                 <div class="right">
                                     <div class="spr">{{item.fsry}}</div>
                                     <div class="sptime">{{item.fsrq}}</div>
                                 </div>
                            </div>
                        </li>
                    </ul>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
 
<script>
import {getlsdList} from '@/api/ywsp/db.js'
export default {
  data() {
    return {
      visible: this.show,
      // lsdList:[],
      lsdleaderList:[], // 领导意见,
      lsddepartmentList:[],//科室意见
     

    };
  },
  props: {
    show: {
      type: Boolean,
      default: false,
    },
  },
  watch: {
    show() {
      this.visible = this.show;
    },
  },
 async created() {
    this.rwid=this.$route.query.featid
   const res= await getlsdList({
     rwid:this.rwid
   })
   console.log(res.data.result)
   this.lsddepartmentList=res.data.result['keshi']
   this.lsdleaderList=res.data.result['lingdao']
   console.log(  this.lsddepartmentList)

   console.log(this.lsdleaderList)
  //  const de=[];
  //     this.lsddepartmentList.forEach(item => {
  //      de.push(item)
  //     });
     
  //     console.log(de)



  //  const {lzyj} = this.lsddepartmentList
  //  console.log( lzyj)
  //  console.log(this.this.lsdleaderList)
    //  let arr =lsddepartmentList(item => {
    //             // console.log(Object.values(item)[0])
    //             console.log(Object.keys(item)[0])
    //           });
 }

};
</script>

<style lang="scss" scoped>
.lsd {
  // width: 1180px;
  // height: 650px;
  /deep/ .lsdhead .el-dialog .el-dialog__header {
    height: 42px;
    background: #f4f6f8 !important;
  }
  /deep/.el-dialog__title {
    font-size: 14px;
    color: black;
    font-weight: bold;
  }

  //联审单
  .main {
   width: 90%;
   ul li{
     .item{
       border-bottom: 1px solid #FAFBFC;
       height: 100px;
     }
     .left{
       margin:10px  0  0 10px;
       float: left;
     }
     .right{
       float: right;
       margin-top:50px;
     }
   }
}
.main h3 {
  text-align: center;
  margin: 50px auto;
}
textarea {
  resize: none;
  width: 1000px;
  height: 150px;
}
.body {
  width: 900px;
  margin: 0 auto;
  table{
    width:100%;
    tr{
      height: 100px;
      td{
        border:1px solid #E0E1E2;
      }
      td:nth-child(1){
        background-color: #FAFBFC;

      }
    }
  }
}

}
</style>